﻿@model MvcApplication2.Controllers.UserMessageViewModel
@{
    Layout = ViewBag.Layout;
    Layout = "~/Views/Shared/_HomeLayout.cshtml";
}
<h2>
    Vote User</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>
<form method="post" class="well form-vertical">
@Html.ValidationSummary(true)
<fieldset>
    <legend>Send exercise proposal [ inserire titolo esercizio e note. </legend>
    @Html.HiddenFor(model => model.UserMessageId)
    @Html.HiddenFor(model => model.ExerciseId)
    @Html.HiddenFor(model => model.DestinationId)
    @*@Html.Hidden("exerciseId", (object)ViewBag.exerciseId)*@
    <div class="control-group">
        @Html.LabelFor(model => model.Rating, new { @class = "control-label" })
        <div class="controls">
            @Html.DropDownListFor(model => model.Rating,
                            Enumerable.Range(0, 11)
                                .Select(x => new SelectListItem
                                                 {
                                                     Text = x.ToString(),
                                                     Value = x.ToString()
                                                 }
                                ))
            @Html.ValidationMessageFor(model => model.Rating)
        </div>
    </div>
    <div class="control-group">
        @Html.LabelFor(model => model.Message, new { @class = "control-label" })
        <div class="controls">
            @Html.TextAreaFor(model => model.Message)
            @Html.ValidationMessageFor(model => model.Message)
        </div>
    </div>
    <div class="form-actions">
        <button class="btn btn-success" type="submit">
            <i class="icon-ok icon-white"></i> Vote</button>
    </div>
</fieldset>
</form>
<div>
    @Html.ActionLink("Back to List", "MyExercises", null, new { @class = "btn btn-inverse" })
</div>
